package com.okaixz.client.controller;


import com.okaixz.client.model.domain.KbAssistant;
import com.okaixz.client.service.IKbAssistantService;
import com.okaixz.common.annotation.Anonymous;
import com.okaixz.common.annotation.OpLog;
import com.okaixz.common.client.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * ai应用信息表 前端控制器
 * </p>
 *
 * @author cdz
 * @since 2025-05-15
 */
@RestController
@Anonymous
@RequestMapping("/kb/assistant")
public class KbAssistantControllerClient {

    @Autowired
    private IKbAssistantService kbAssistantService;


    @GetMapping("/list")
    @OpLog(opType = "", opDesc = "获取人设标签列表")
    public Result<List<KbAssistant>> list(@RequestParam String tabId,@RequestParam Integer sex) {
        List<KbAssistant> list=kbAssistantService.selectKbAssistantList(tabId,sex);
        return Result.success(list);
    }
    @GetMapping("/hotlist")
    public Result<List<KbAssistant>> hotList(@RequestParam Integer sex) {
        List<KbAssistant> list=kbAssistantService.getHotList(sex);
        return Result.success(list);
    }
    /**
     * 如果用户一个标签都没添加 则返回默认列表
     * @param sex
     * @return
     */
    @GetMapping("/defaultlist")
    public Result<List<KbAssistant>> defaultlist(@RequestParam Integer sex) {
        List<KbAssistant> list=kbAssistantService.defaultlist(sex);
        return Result.success(list);
    }
    /**
     * 定制特质列表
     * @param sex
     * @return
     */
    @GetMapping("/baselist")
    @OpLog(opType = "", opDesc = "获取定制特质列表")
    public Result<List<KbAssistant>> baseList(@RequestParam Integer sex) {
        List<KbAssistant> list=kbAssistantService.baselist(sex);
        return Result.success(list);
    }

}
